//
//  SearchTableViewCell.m
//  Funny
//
//  Created by dllo on 15/11/4.
//  Copyright © 2015年 King. All rights reserved.
//

#import "SearchTableViewCell.h"

@implementation SearchTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.pic = [[UIImageView alloc]init];
        self.pic.layer.masksToBounds = YES;
        self.pic.layer.cornerRadius = 25;
        self.pic.image = [UIImage imageNamed:@"11map@3x.png"];
        [self.contentView addSubview:self.pic];
        
        self.name = [[UILabel alloc]init];
        self.name.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:self.name];
        
        self.address = [[UILabel alloc]init];
        self.address.textColor = [UIColor grayColor];
        self.address.font = [UIFont systemFontOfSize:13];
        [self.contentView addSubview:self.address];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.pic.frame = CGRectMake(10, 10, 50, 50);
    self.name.frame = CGRectMake(80, 7, SelfWidth - 90, 30);
    self.address.frame = CGRectMake(80, 40, SelfWidth - 90, 30);
}

- (void)setModel:(SearchModel *)model
{
    self.address.text = model.address;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
